module.exports = run;

run.$inject = ['$rootScope', '$state', '$stateParams', 'i18nService'];

function run($rootScope, $state, $stateParams, i18nService) {
    $rootScope.baseUrl = 'http://' + ipPort;
    i18nService.setCurrentLang('zh-cn');
    $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState) {
        // 获取当前状态，绑定到根作用域上
        $rootScope.$state = $state;
        $rootScope.$stateParams = $stateParams;
    });
};
